﻿using System;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Http;
using System.Web.Http.Dispatcher;
using System.Web.Mvc;
using System.Web.Routing;
using System.Xml;
using System.Xml.Linq;
using Mvc2Ng.Web.UI.Core.UI;
using WebConfigurationManager = System.Web.Configuration.WebConfigurationManager;
using System.Web.Optimization;
using Mvc2Ng.Web.StaticResources;

namespace Mvc2Ng.Web.UI {

  public class MvcApplication : HttpApplication {

    private static bool IsLocalHost {
      get {
        return HttpContext.Current == null || HttpContext.Current.Request.Url.Authority.Contains("localhost");
      }
    }

    protected void Application_Start() {

      RouteConfig.RegisterRoutes(RouteTable.Routes);
      BundleConfig.RegisterBundles(BundleTable.Bundles);

      ModelMetadataProviders.Current = new PropertyUiHintModelMetadataProvider(); // OLD: ModelMetadataProviders.Current
      DefaultModelBinder.ResourceClassKey = typeof(ModelResources).Name;
    }

  }
}